module;
#include <lvgl.h>

export module gui;

/*!USER_DECLARE_BEGIN!*/
/*!USER_DECLARE_END!*/

// ---------------- 资源声明 ----------------
extern "C" {
    // 字体声明
    LV_FONT_DECLARE(lv_customer_font_SourceHanSerifSC_Regular_13)
    /*!USER_DECLARE_BEGIN!*/
    /*!USER_DECLARE_END!*/
    // 图片声明
    LV_IMG_DECLARE(_dianzisheji_RGB565A8_83x55)
    /*!USER_DECLARE_BEGIN!*/
    /*!USER_DECLARE_END!*/
    // 其他
    /*!USER_DECLARE_BEGIN!*/
    /*!USER_DECLARE_END!*/
}

// ---------------- 组件定义 ----------------
export namespace gui::widgets::main {
    using namespace gui::compose;
    inline Button btn_press;
    /*!USER_DECLARE_BEGIN!*/
    /*!USER_DECLARE_END!*/
}

// ================== 用户空间 ==================
/*!USER_DECLARE_BEGIN!*/
/*!USER_DECLARE_END!*/

// ---------------- UI接口 ----------------
export namespace gui::interface {
    using namespace gui::widgets::main;
    /*!USER_DECLARE_BEGIN!*/
    
    /*!USER_DECLARE_END!*/
}

// ---------------- 初始化逻辑 ----------------
export namespace gui
{

    class ui
    {
    public: 
        static void void screenInit() {
            using namespace gui::widgets::main;
            
            btn_press.init(screen);
			lv_obj_set_size(btn_press,100,20);
			lv_obj_set_text_size(btn_press,100,20);

			btn_release.init(screen);
			btn_release.pos(102,12);
			lv_obj_set_size(btn_release,100,20);
			lv_obj_set_text_size(btn_release,100,20);

            /*!USER_DECLARE_BEGIN!*/
            /*!USER_DECLARE_END!*/
        }
        
        static void eventInit() {
            using namespace gui::widgets::main;
            /*!USER_DECLARE_BEGIN!*/
            /*!USER_DECLARE_END!*/
        }
    };
}

/*!USER_DECLARE_BEGIN!*/
/*!USER_DECLARE_END!*/
